package com.designMode.factory;

import java.util.*;

public class roleFactory {

    public  static HashMap<String,roleOperation> factory = new HashMap<String,roleOperation>();
    static {
        factory.put("ROOT_OPERATOR",new RootOperator());
        factory.put("MEDIUM_OPERATOR",new MediumOperator());
        factory.put("COMMON_OPERATOR",new CommonOperator());

    }
    public static roleOperation createRole(String type){

        return factory.get(type);
    }
}
